﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Web.Mvc;

namespace Blog.EF
{
    public class CrossDomainAttribute:System.Web.Mvc.ActionFilterAttribute
    {
        public override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            //跨域配置
            //var response = filterContext.RequestContext.HttpContext.Response;
            //response.AddHeader("Access-Control-Allow-Origin","*");
            //response.AddHeader("Access-Control-Allow-Credentials", "true");
            //response.AddHeader("Access-Control-Allow-Methods", "GET,POST,PUT,OPTIONS");
            //response.AddHeader("Access-Control-Allow-Headers", "x-request-with,content-type");
            //base.OnActionExecuting(filterContext);
        }
    }
}
